package com.gaofans.vertx.boot.web.session;

import io.vertx.core.http.CookieSameSite;
import io.vertx.ext.web.handler.SessionHandler;

/**
 * session的配置
 * @author GaoFans
 */
public class SessionProperties {

    private CookieSameSite cookieSameSite = CookieSameSite.STRICT;

    private boolean lazySession = SessionHandler.DEFAULT_LAZY_SESSION;

    private boolean cookieHttpOnlyFlag = SessionHandler.DEFAULT_COOKIE_HTTP_ONLY_FLAG;

    private boolean cookieSecureFlag = SessionHandler.DEFAULT_COOKIE_SECURE_FLAG;

    private int minLength = SessionHandler.DEFAULT_SESSIONID_MIN_LENGTH;

    private boolean nagHttps = SessionHandler.DEFAULT_NAG_HTTPS;

    private String sessionCookieName = SessionHandler.DEFAULT_SESSION_COOKIE_NAME;

    private String sessionCookiePath = SessionHandler.DEFAULT_SESSION_COOKIE_PATH;

    private long sessionTimeout = SessionHandler.DEFAULT_SESSION_TIMEOUT;

    public CookieSameSite getCookieSameSite() {
        return cookieSameSite;
    }

    public void setCookieSameSite(CookieSameSite cookieSameSite) {
        this.cookieSameSite = cookieSameSite;
    }

    public boolean isLazySession() {
        return lazySession;
    }

    public void setLazySession(boolean lazySession) {
        this.lazySession = lazySession;
    }

    public boolean isCookieHttpOnlyFlag() {
        return cookieHttpOnlyFlag;
    }

    public void setCookieHttpOnlyFlag(boolean cookieHttpOnlyFlag) {
        this.cookieHttpOnlyFlag = cookieHttpOnlyFlag;
    }

    public boolean isCookieSecureFlag() {
        return cookieSecureFlag;
    }

    public void setCookieSecureFlag(boolean cookieSecureFlag) {
        this.cookieSecureFlag = cookieSecureFlag;
    }

    public int getMinLength() {
        return minLength;
    }

    public void setMinLength(int minLength) {
        this.minLength = minLength;
    }

    public boolean isNagHttps() {
        return nagHttps;
    }

    public void setNagHttps(boolean nagHttps) {
        this.nagHttps = nagHttps;
    }

    public String getSessionCookieName() {
        return sessionCookieName;
    }

    public void setSessionCookieName(String sessionCookieName) {
        this.sessionCookieName = sessionCookieName;
    }

    public String getSessionCookiePath() {
        return sessionCookiePath;
    }

    public void setSessionCookiePath(String sessionCookiePath) {
        this.sessionCookiePath = sessionCookiePath;
    }

    public long getSessionTimeout() {
        return sessionTimeout;
    }

    public void setSessionTimeout(long sessionTimeout) {
        this.sessionTimeout = sessionTimeout;
    }
}
